package com.gxh.controller.user;

import com.gxh.dto.FeedbackDTO;
import com.gxh.result.Result;
import com.gxh.service.FeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userFeedbackController")
@RequestMapping("/gxh/user/feedback")
@Api(tags = "用户反馈接口")
@Slf4j
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;

    /**
     * 用户反馈
     * @param feedbackDTO
     * @return
     */
    @ApiModelProperty("用户反馈")
    @PostMapping
    public Result feedback(@RequestBody FeedbackDTO feedbackDTO){
        log.info("用户反馈{}" ,feedbackDTO);
        feedbackService.feedback(feedbackDTO);
        return Result.success();
    }
}
